Ordering and topological defects in social wasps’ nests

Social insects have evolved a variety of architectural formations. Bees and wasps are well known for their ability to achieve compact structures by building hexagonal cells. Polistes wattii, an open nesting paper wasp species, builds planar hexagonal structures. Here, using the pair correlation function approach, we show that their nests exhibit short-range hexagonal order (no long-range order) akin to amorphous materials. Hexagonal orientational order was well preserved globally. We also show the presence of topological defects such as dislocations (pentagon-heptagon disclination pairs) and Stone-Wales quadrupoles, and discuss how these defects were organised in the nest, thereby restoring order. Furthermore, we suggest the possible role of such defects in shaping nesting architectures of other social insect species.


Ordering and topological defects in social wasps' nests
Shivani Krishna 1* , Apoorva Gopinath 1 & Somendra M. Bhattacharjee 2 Social insects have evolved a variety of architectural formations. Bees and wasps are well known for their ability to achieve compact structures by building hexagonal cells. Polistes wattii, an open nesting paper wasp species, builds planar hexagonal structures. Here, using the pair correlation function approach, we show that their nests exhibit short-range hexagonal order (no long-range order) akin to amorphous materials. Hexagonal orientational order was well preserved globally. We also show the presence of topological defects such as dislocations (pentagon-heptagon disclination pairs) and Stone-Wales quadrupoles, and discuss how these defects were organised in the nest, thereby restoring order. Furthermore, we suggest the possible role of such defects in shaping nesting architectures of other social insect species.
Animal nests and their architecture are crucial for the development of the young, protection from predators, and storage of resources. The diversity and complexity in architecture signify how these functions are fulfilled in diverse habitats and environmental conditions. Such complexity is exemplified by the nests of social insects (ants, bees, termites, and wasps) owing to their ability to use or modify the surroundings, and create ordered and plastic structures [1][2][3] . These nests have captivated mathematicians and ecologists alike for their structural complexity and the mechanisms behind the coordinated building [4][5][6][7] . How do multiple individuals in a group or a colony come together to construct these tiled layouts? The principle of stigmergy explains this as the formation of patterns by emergence 8 , including self-organisation and self-assembly mechanisms 9,10 . In most species, the construction rules depend on environmental (e.g., humidity, soil moisture) or pheromone gradients 1,11 . In this context, the relative importance of self-organised 12,13 vs template-based interactions has been examined, and current evidence points towards architectural mechanisms being an interactive effect of both these interactions 14 .
It is paramount to place these mechanisms in the context of behavioural and cognitive processes to understand nest construction comprehensively. The repertoires required for complex nest architectures are often characterised by simplified clusters of direct steps. However, the processes involved in planning construction in various environmental conditions, detecting errors and their remediation, working around novel obstructions, etc., require substantial cognitive abilities that outwit simple algorithms 15 .
In bees and wasps, cells within the nest are usually circular or hexagonal. Hexagonal tiling provides a compact structure and is proven to cover a planar region with regular units of equal area whilst minimising the total perimeter (honeycomb conjecture 16 ). Such optimal utilisation of space and energy has been proposed as the significant selection pressure for shaping these structures 15,[17][18][19] . Honeybees use wax to shape their cells, while most wasp species use either mud or fibrous materials of plant origin for construction. Though the cells are hexagonal in both cases, the construction materials possess strikingly distinct properties. Therefore, the underlying processes could be different. Construction of bees' wax-based cells is postulated to begin as an array of circles (laid over packed cylinders as a base) that are modified to rounded hexagons purely by mechanical/ thermodynamic means 20,21 . However, experimental work from nests of European honeybees suggests that bees actively construct hexagonal cells by handling the wax and controlling its temperature 22 . Given the plasticity of wax, any disruptions to tiling in these structures can be rectified, thereby reducing the possibility of overall defects in the nests. Hence the legend of honeycomb ordering. On the other hand, nests made up of plant fibres such as those of paper wasps are unlikely to follow similar modes of construction. The reduced plasticity makes them interesting as ordered physical systems prone to topological defects. A topological defect in systems of broken symmetry, like crystals, magnets, liquid crystals, etc., is defined as a disruption of order throughout the system in a way that defies restoration via any continuous deformation 23,24 . In contrast, defects such as vacancies, hilly terrain in a flat land, etc., are geometric defects as they affect order locally in their neighbourhood without any signature far away from them. A key characteristic of topological defects is that they cannot be repaired by local rearrangements alone but instead require changes to the system globally. Geometric defects can be amended by making changes locally at the scale of basic elements or constituents 25 . Here, we refer to topological defects as those that occur and affect at length scales beyond a single unit/element, such as a single cell within a nest. The emergence and evolution of such topological defects in paper wasps' nests have never been studied. Some of the most common topological defects in crystals and liquid crystals manifest as disclinations and dislocations 26,27 . Examples of such disclinations have been shown in living systems such as protein coats of viruses 28 and insect corneal nanostructures 29 , where insertion of pentagons into an array of packed hexagons results in Gaussian curvature and breaks the sixfold rotational symmetry. Similarly, the Stone-Wales defect, characterised by two pentagons and two heptagons 30 , is a well-known defect in graphene, fullerene, and carbon nanotubes 31,32 .
Paper wasps of Polistes genus build nests hanging from one or more stalks. The nest itself is made up of open hexagonal cells. Variations in nesting architectures within paper wasps have been attributed to selection pressures such as predation from ants or flying insects, insulation from heat, and economic use of building material 18,[33][34][35][36] . The diversity of nest forms in paper wasps and their growth have been elegantly explained by a simple set of rules by Karsai and Pénzes 37 . The model suggests that multiple forms could be built by changing the weightage assigned to different parts of the nest. However, by construction, these models describe regular hexagonal structures only. The likelihood of these models explaining changes to regular hexagonal tiling or within nest changes to order is small. In this paper, analysing the nesting architecture of paper wasps (Polistes wattii), we ask the following questions: (a) What is the nature of ordering (i.e., short-range vs long-range) and spatial arrangement of cells within and between the nests? In the current context, order describes the regularity in the tiling of the cells within the nests. Short-range order (SRO) represents the arrangements of nearest neighbours in the nest, while long-range order (LRO) represents the regularity over a longer distance. More quantitatively, a nest is said to have long-range order if there is a nonzero probability of finding the corners of two cells on the same regular lattice, even for large separations between the cells. (b) What are the topological defects found in theses nests?

Methods
The study was conducted within the campus of Ashoka University, Sonepat, India (28.9457 • N, 77.1021 • E) located at an altitude of 224 m. The maximum temperature in summers is 45--47 • C, and the lowest temperature in winters is around 4-6 • C. Wasps of the genus Polistes have a widespread distribution and are a well-studied example for the evolution of sociality and dominance hierarchies in insects. It is a primitive and speciose genus with more than 200 species 38 . P.wattii is known to be distributed across central and South Asia 39 . They are inactive during the winter, and nest building begins once they emerge from hibernation. The construction of nests often lasts till late summer. In our study, all the analysed P.wattii nests were from anthropogenic habitats. Nesting height was typically within the range of 5-15 m. Images of nests were taken in the summer of 2020 and 2021. Adult nests that were fully constructed and completed the season were considered for analysis (typically with at least 50 cells, Figure S4). These nests were photographed with a reference scale. Images were further analysed by subtracting the background and binarisation using ImageJ 40 . The positions of all the individual vertices (corners shared by at least three cells) were marked on the images, and their x, y coordinates were exported for subsequent analysis. Here, we have taken the structure to be planar (see Results and Discussion for details). To avoid the effect of boundary which includes incomplete cells, a few layers of vertices along the edges were excluded. Apart from these, a few cells with cylindrical projections where identifying the underlying vertices was difficult were excluded from the final analyses. Overall, 25 nests were used to characterise the degree of ordering. The presence of topological defects was identified by inspecting the number of vertices for the cells within 35 different nests. We characterised the defects by identifying their basic features (number of vertices and neighbouring cells) and calculating the internal angles of the first neighbouring hexagonal layer from coordinates. For a region without defects, we would expect these angles to be close to 120 • .
To quantify ordering and analyse the spatial distribution of cells, we used pair correlation function g(r) (henceforth PCF) based on Ripley's K function derivative method in the spatstat package with default smoothing parameter 41 . The approach relies on the probability of finding a pair of vertices separated by a distance r. This results in an average representation of the local spatial neighbourhood at a distance r from any given vertex. PCF of a regular lattice exhibits sharp peaks at the lattice spacing distances (resolved using a lower smoothing parameter than the default value). Such sharp peaks indicate perfect ordering. On the other hand, an amorphous structure will show some reduced degree of order; in particular, it would have g(r) approaching 1 for large values of r. The limiting value of 1 indicates no correlation between the positions of vertices when they are far apart. In a PCF, the peak heights are generally related to the number of neighbours. The first two peaks were discernible in nests of different sizes, allowing us to focus on the location and width of these peaks for each of the nests. The following function consisting of two Gaussians with amplitudes a 1 , a 2 has been used to fit the first two peaks of the g(r)-vs-r curve for each nest, where r 1 , s 1 represent the location and the width of the first peak, and r 2 , s 2 of the second peak. We also calculated the coefficient of variation (CV) of location and width for the first two peaks to quantify the extent of variation in order between nests.
We measured the individual cell areas and compared the variation between and within the analysed nests. We also calculated the nearest neighbour distances or bond lengths, i.e., distances between vertices (henceforth wall lengths). Based on the the fitted values of Eq. (1), the wall length would be in the range r 1 ± 2s 1 . Information of www.nature.com/scientificreports/ translational ordering is given by the PCF, and to obtain the orientational order, we defined cell-orientational order in analogy with bond-orientational order in liquids. Cell-orientational order parameter is a measure of the geometrical arrangement of the vertices of a given cell around its cell centre 42,43 . Cell-orientational order parameter ψ n is given by a complex number defined at each cell centre as, where N j is the number of vertices of cell j centered at X j , θ jk represents the angle between the line joining vertex k to the centre and the chosen x-axis, and n is an index for orientational ordering (Fig. 1). For hexagonal ordering, we choose n = 6 . Note that ψ n neither depends on the vertex numbering scheme nor the size of the hexagon. As a complex number, ψ n = |ψ n |e iθ lies on or within the unit circle in the complex plane, and therefore, ψ n (X j ) can be represented graphically by a vector at an angle θ with the x-axis at the cell centre X j . The average ψ n of ψ n (X j ) over a large number of hexagons lies in the range 0 ≤ |�ψ n �| ≤ 1 with the two extreme values representing a random orientational arrangement ( �ψ 6 � = 0 ) and a perfect hexagonal ordering ( �ψ 6 � = 1 ). We calculated the cell-orientational order parameter for a simulated set of random central angles to study the decay of |�ψ 6 �| from the perfect value of 1 (note that �ψ 6 � = 0 corresponds to independent hexagons which do not form a regular lattice; details in Supplementary Information). Analyses were performed by using Fortran (https://gcc.gnu.org) and R software 44 .

Results and discussion
Nature of ordering and spatial arrangement of cells in the nests. The number of cells in the analysed nests ranged between 50 and 740. For each nest, we characterised the nature of ordering by calculating pair correlation function for the vertices. For a regular hexagonal lattice, sharp peaks (in principle, δ-function) occur at distances corresponding to radii of different shells indicating the presence of both short and long-range order 45 . As shown in Fig. 2, for any vertex on the hexagonal lattice, the first, second, and third neighbours lie on circular shells and the first 3 PCF peaks reflect this regularity. We found that there is a substantial overlap between the first and second peaks of a regular hexagonal lattice and those of a typical nest. As r increases, this overlap disappears. This pattern of the PCF illustrates the SRO in the structure of nests. The presence of a peak in a PCF confirms that any given vertex would have neighbouring vertices at distances provided by the peak position. This is an example of SRO. Moreover, the decaying envelope of the PCF to g(r) = 1 is a signature of the absence of LRO. The proximity of the third peak to the second peak is an inherent characteristic of a hexagonal lattice, suggesting that the two shells are closeby. However, the second shell and third shell are not resolved in the case of nests, due to broad wall-length distribution. The absence of sharp peaks and the missing proximity of second and third shells are signatures of deviation from regularity. Indeed, the broad peaks in the nest PCF curves indicate heterogeneity of cell sizes that impairs ordering over long distances. Therefore, we conclude that similar to amorphous structures, nests exhibit SRO but no LRO. The PCF curves of nests shown in Fig. 3a have been normalised such that the first peak is at r = 1 (nonnormalised individual nests' PCFs are shown in Supplementary Information, Figure S1). When variations in translational order of nests were analysed, the nest-to-nest variation was found to be restricted to larger r values. This is further corroborated by the low variance values (coefficient of variation, CV) of location and width of the first peak compared to the second peak (Fig. 3b,c,d).
The structural features were analysed by characterising the distribution of wall lengths, cell areas, and cell orientational order (Fig. 4). Figure 4a depicts the extent of variation in wall lengths between the different nests. The lengths varied within the range of 0.1 and 0.9 cm, with a median value of 0.3 cm. The cell areas were in the range of 0.07 to 0.85 sq.cm (median= 0.25 sq.cm, Fig. 4b). The distribution of cell wall-lengths also fits well with the values obtained from the Gaussian fit of the first peak of the PCF. Furthermore, we analysed if the degree  Figure 1. Cell-orientation order parameter (Eq. 2). The angle θ jk is measured from an arbitrarily chosen x-axis through the centre as shown in (a). For a regular hexagon with inner angles at 2π/3 , the orientation in (a) has ψ n = 1 while in (b) ψ n = −1 . In general, ψ n is orientation-dependent with |ψ n | less than or equal to 1. For regular hexagons, individual ψ n lies on the unit circle. The six-fold symmetry of a regular hexagon is preserved by ψ n as it returns to its value under a π/3 rotation of the hexagon around its centre. www.nature.com/scientificreports/  www.nature.com/scientificreports/ of deviation was greater within the nest or between the nests. Percent CV values of cell areas ranged between 13 and 28 while the wall-lengths varied from 44 to 58%. The wall-length variation was greater within the nests than between the nests. Cell wall length distributions were analysed for randomly chosen cells from central and peripheral regions of wasp nests to test the assumption of planarity of the nest. For a curved surface, one expects the wall lengths of peripheral cells to be different from those in the central region. These distributions were found to overlap (Fig. S5). Therefore, we conclude that the curvature-induced systematic distortion (if any) is indistinguishable from the wall-length distribution of the cells. Our analysis suggests that the orientation of the cells is fairly preserved and aligns well with the nearest neighbours (Fig. 4c, d). The orientational order parameter varied between the nests in the range of 0.1 and 1, with a median value of 0.85. Significant overlap in cell orientational order parameter distributions of the nests suggests that the presence of orientational order is true across the nests (Fig. 4c). Percent CV values varied between 16 and 31, indicating that variation within nests in cell orientational order was smaller than the variation in wall lengths. Compared to the case of a single cell with random internal lengths (see Supplementary Information), the probability distribution of ψ 6 in Fig. 4c is wider. We attribute this to the cooperative effect of building a compact nest and yet becoming amorphous-like in the large scale limit. A well-studied example of such cooperative-effect induced broadening is the probability distribution of magnetism as one approaches the Curie temperature of a magnet 46 . Taken together, the pair correlation function and distribution of cell orientational order parameters suggest the presence of short-range hexagonal order and an overall orientational order even though there is no long-range order akin to amorphous materials.
Topological defects. Hexagonal structures are prone to defects that emerge in a variety of ways. In the analysed nests, we show the presence of topological defects in the form of non-hexagonal cells. Akin to defects in most materials, these were found to occur at low frequency (20% of the nests). In few nests of P. annularis 47 , non-hexagonal cells were reported to induce the required curvature of nests. However, the presence of octagons and higher-order defects has not been reported.
Defects such as one pentagon or one heptagon amidst hexagons disrupt the planarity of a honeycomb structure as shown in Figure 5a,b 48 . If structural disorders such as topological defects are left uncorrected, they affect the overall planarity of the nest. The missing link of a pentagon in a hexagonal net necessarily requires the removal of a wedge of hexagons, producing a cone-like structure as shown in Fig. 5a. Similarly, an opposite curvature can be produced by a single heptagon (Fig. 5b) with an extra link that requires the insertion of a wedge. As these curvatures cannot be ironed out, these are topological defects called disclinations that tend to disrupt the orientational order of the lattice. A pair of the two opposite types do not cancel each other but instead carry with them a line defect, which is called a dislocation line. This dislocation line consists of an extra array of hexagonal cells (Fig. 5c). Furthermore, a dislocation is characterised by drawing a loop in a region without defects and comparing it with a similar loop that encloses it. The steps required to close the loop are characteristic of the defect and independent of the size and shape of the loop. This topological invariant called Burgers vector is shown in Fig. 5c. www.nature.com/scientificreports/ Figures 6 and 7 show the distinct types of such defects found within the analysed nests. Stone-Wales defect comprises of two pentagons and two heptagons (Fig. 6b), which typically arises by a simple 90 • rotation of the bond (wall) between two hexagons. As a pentagon-heptagon pair is a dipole, Stone-Wales defect becomes equivalent to a disclination quadrupole (two oppositely oriented dipoles). These nomenclatures are analogous to those of electric charges. Though a local fault in construction can produce a Stone-Wales defect (Fig. 6b), it is still topological in nature as the distortion propagates to the boundary. Such topological defects are known to occur commonly in graphite and graphene 49 . For cells with defects that occur in pairs or as groups, we measured the angles of the neighbouring vertices for upto one shell of nearest neighbours. For a regular hexagonal lattice, these angles would be 120 • , and for the nest without defects, we found that a set of randomly chosen cells subtended angles that ranged between 90 • and 140 • . However, hexagonal cells adjoining the defect pairs such as pentagon-heptagon showed angles that range from 99 • to 151 • , which differed from both the regular hexagonal lattice as well as hexagonal cells in the nest. Figure 7a depicts a defect where an octagon is embedded within three pentagons, four hexagons, and a heptagon. This is obtained by a 90 • rotation of the wall between three hexagons and a heptagon. Another defect that was observed was an octagon with two pentagons on either side (Fig. 7). This complex changes to a four-hexagon configuration by a wall addition followed by a split (change in the wall  www.nature.com/scientificreports/ angles of the central wall). Such extended defects are equivalent to pairs of dislocations, which do not have any associated Burgers vector. These arise in scenarios where wasp(s) have constructed the outline of cells, and the internal walls were added subsequently. All the above-described defects were found to maintain the three-point vertices (vertex connected by three walls).
A dislocation for a two-dimensional system consists of a pentagon-heptagon pair (i.e., a pair of opposite disclinations). The presence of such a defect necessarily entails an extra row of hexagons that vitiates the translational order at large distances but not the bond-orientational order. Consequently, a proliferation of dislocations can produce a state of bond-orientational order without any translational order (a distinct phase of matter well known as the hexatic phase). A liquid is formed when the dislocations break into disclinations (independent pentagons and heptagons) 50 , which destroy the residual bond-orientational order. For instance, when these defects are induced by thermal energy, one sees a two-step melting process of a two dimensional crystal. In colloidal crystals, dislocations or disclination dominated phases can be produced by external agencies like laser. In short, topological defects significantly influence a system's behavior. In this spirit, the disposition of the two-dimensional nests is ultimately determined by the nature of the individual cells and the topological defects, which are generated by the construction rules adopted by the wasps.
While pentagon-heptagon pairs were found to occur in nests, the configuration where hexagons separate a pentagon and a heptagon was never observed in our dataset. Interestingly, some of the described defects and their properties are utilised by honeybees to attain curvature as well as to merge cells of different sizes 51,52 . Cells of different sizes are routinely observed in honeycombs as larvae of drones and workers are of different sizes. Retaining order with cells of different sizes that are being built independently by different individuals poses a challenge, and the honeybees counter this by local sensing and introducing non-hexagonal cells where required [52][53][54] . The introduction of a pentagon or a heptagon adjacent to each other is only possible by a regular set of local inspections carried out by wasps to identify possible deviations from hexagonality. There are two alternatives to explain the emergence of these defects that require further investigations. These alternatives are as follows: a) As the angle of a regular heptagon is 128.5 • is closer to that of a regular hexagon than a pentagon whose angle is 105 • , heptagons have arisen first, which are then fixed immediately by adding a pentagon, and b) the higher number of pentagons overall suggests that moulding cells with lesser material could have erroneously resulted in pentagons that were subsequently fixed by inserting a heptagon. It is likely that experience and learning play a crucial role in repair processes. Experiments in P. fuscatus have shown the presence of an elaborate building programme that is beyond a set of linear steps, including repairing cell walls when damaged, adding pulp, and strengthening the stalk when required, which is done by multiple inspections 55 . This suggests that deviations from 6-sidedness are also possibly assessed via such inspections. However, it is unknown if these inspections involve identifying the number of vertices, measuring the internal angles or by Burgers vector.

Conclusion
Our results suggest that the nests of Polistes wattii show orientational order without any translational long-range order in the placement of the hexagonal cells on a planar surface. However, the ordering is well preserved in the immediate neighborhood of the cells (short-range order). Furthermore, topological defects were identified in the form of dislocations and disclinations (non-hexagonal cells) in the nests. We showed that these defects were organised such that the planarity of the nests was maintained. We used the approach of pair correlation function and topological methods to analyse these structural features of wasp nests.
Two key features that were never violated in the nests were a) convexity of individual cells and b) planar global structure. We postulate that wasps conduct systematic localised inspections, detect changes in local symmetry or order, and make changes to the adjoining cells to restore order. Going further, we intend to test the role of cell size heterogeneity on the emergence of topological defects and the relationship between the decay www.nature.com/scientificreports/ length of pair correlation function with the size of the nests. Future studies could place the nests in captivity and characterise the behaviours that precede and succeed the construction of cells around the defects. The introduction of defects experimentally in such captive nests would help understand the response of individuals and the group. While our study establishes the presence and repair of the defects, it is unclear if all the wasps equally participate in this process or certain keystone individuals are efficient at inspection and repair processes. These additional studies would therefore allow us to understand the behavioral mechanisms encompassing the repair of topological defects.

Data availability
The datasets used in the current study will be available from the corresponding author on request.